1. Field of the Invention
The present invention relates to a technology for performing preventive data scan of a disk used in a storage device.
2. Description of the Related Art
Data stored on a disk of a storage device (magnetic disk device) can be damaged due to various reasons. External causes, degradation of disk with time are some examples of such reasons. If data is damaged, e.g., data loss or imperfect data occurs, that data can not be read. The external cause means that data stored in a certain area of a disk is damaged by leakage flux generated when new data is written on an adjacent area of the same disk. Furthermore, the external cause means that part of the stored data is mistakenly overwritten with new data due to vibration of a storage device when new data is written on the adjacent area.
If there is damaged data on a disk, it becomes necessary to check whether the damaged data is recoverable or unrecoverable, and to replace damaged sectors. These processes put extra load on the storage device.
In recent years, there has been made tremendous improvement in storage capacity of disks. Such improvement in the storage capacity has resulted from increase in storage density. Increase in the storage density implies that there are higher chances of data being damaged. In view of these facts, Japanese Patent Application Laid-open No. H7-182250 discloses a technology for ensuring quality of data stored in a disk. Specifically, a read verify operation is performed on the disk while a storage device is in an idle state, i.e., a state where the storage device is not receiving any command or the like from a higher-level device.
The read verify operation includes:                (1) recording information about sectors that have unrecoverable reading error;        (2) rewriting data in sectors that have recoverable reading error; and        (3) replacing a sector if that sector produces some sort of error even after data has been rewritten to that sector.        
The processes (1) to (3) are collectively called Background Medium Scan (hereinafter, “BMS”), of which specification is proposed by the American National Standard Institute (ANSI).
However, the BMS of the disk can be performed only when the storage device is in idle state. In other words, the BMS is not suitable to environments where a storage device continuously and periodically receives commands from a higher-level device. RAID (Redundant Arrays of Inexpensive Disks) system is an example where the BMS can not be employed.